package com.kx.center.mappers;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.kx.center.entity.ScTrade;
import com.kx.center.entity.Trade;
import com.kx.center.entity.huiyin.Merchant;
import com.kx.center.entity.huiyin.MtOrder;
import com.kx.center.entity.huiyin.PayTranLog;
import com.kx.center.entity.huiyin.SaleOrder;
import com.kx.center.entity.huiyin.SaleOrderPay;
import com.kx.center.entity.huiyin.TradePoi;
import com.kx.center.entity.query.QueryTrade;

public interface TradeMapper {

	public void insertMtOrder(MtOrder mtOrder);
	public void insertSaleOrder(SaleOrder saleOrder);
	public void insertSaleOrderPay(SaleOrderPay saleOrderPay);
	public void insertMerchant(Merchant merchant);
	public void insertPayTranLog(PayTranLog payTranLog);
	public void updateMerchant(Merchant merchant);
	public void insertTrade(Trade trade);
	public List<TradePoi> findTradeList(QueryTrade queryTrade);
	public Long saleOrderMaxTime();
	public Long saleOrderPayMaxTime();
	public List<String> findMerchantIdList();
	public Long payTranLogMaxTime();
	public List<String> findTradeIdList();
	public List<Trade> findTradeListTwo();
	public List<Trade> findMtOrderList();

	// 此处写订单汇总
	public void insertScTrade(ScTrade scTrade);
	public void updateScTradeState(ScTrade scTrade);
	public List<ScTrade> findScTradeDetailList(QueryTrade queryTrade);
	public Integer findScTradeCount(QueryTrade queryTrade);
	public ScTrade findScTradeById(@Param("channelId") Integer channelId,
			@Param("outerId") Long outerId);
	public Double findTradeAmountById(@Param("storeId") Integer storeId,
			@Param("date") String date);
	public int findTradeOrderById(@Param("storeId") Integer storeId,
			@Param("date") String date);
	public int findTradeGoodsById(@Param("storeId") Integer storeId,
			@Param("date") String date);
	
}
